test: cover lint command output and exit codes - #53
Open
FanouZeng-TT wants to merge 1 commit into
Open
Conversation
Contributor
|
Thanks @FanouZeng-TT ! Since
|
17 tasks
Contributor
Author
|
Thanks for the follow-up suggestions. I’ll keep the current test-only change focused and cover the missing-path, strict-warning, and quiet-output cases together with the adjacent CLI behavior work, so they can share one coherent test matrix rather than expanding this PR piecemeal. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
src/linter.rshas unit coverage for individual diagnostics, but the publicucp-schema lintcommand had no CLI integration tests. Other commands intests/cli_test.rscover their argument handling, exit codes, and output, whilelint's command boundary remained unpinned:
A regression in clap wiring, the error exit code, or JSON serialization could
therefore pass all linter unit tests.
Fix: add CLI contract tests for a valid schema (exit 0), a broken internal
reference (
E003, exit 1), and parseable--format jsonoutput with theexpected aggregate fields.
Category (Required)
Related Issues
N/A
Checklist
generate_models.shunder python_sdk. (Not applicable: ucp-schema test-only change.)Screenshots / Logs (if applicable)
N/A — the new lint CLI tests pass 3/3; the full Rust suite passes 318/318. Full pre-commit, rustfmt, codespell, and
git diff --checkalso pass.